<div class="group status form">
<h2><?php if($this->data['Decision']['grouped']==0){ __('Group the status');}else{__('Ungroup the status');}?></h2>
<?php
//echo $this->element('tinymce',array('preset'=>'basic'));
echo $form->create('Decision',array('type'=>'file','url'=>array('meetingid'=>$this->data['Meeting']['id'],'committee'=>$dcommittee['Committee']['short_name'],'action'=>'status')));?>
    
<?php
if(isset($returnpage)){
    echo $form->hidden('returnpage',array('value'=>$returnpage));
}
echo $form->input('id');?>
<?php $item_name = strlen($dcommittee['Committee']['item_name'])>2 ? __($dcommittee['Committee']['item_name'],true) : __('Project',true);?>
<span class="viewtitle"><?php echo ucwords($item_name);?>:</span>
<?php echo $this->data['Item']['short_name'];?><br/>

<span class="viewtitle"><?php __('Deadline');?>:</span> 
<?php echo date(Configure::read('date_format'),strtotime($this->data['Decision']['deadline']));?><br/>

<span class="viewtitle"><?php __('Description');?>:</span> 
<?php echo $this->data['Decision']['description'];?> <br/>

<?php
if(count($this->data['User'])):
?>
    <span class="viewtitle"><?php __('Individual Implementor');?>:</span> <?php echo "<ul>"; foreach($this->data['User'] as $user) echo "<li>".$user['name']."</li>"; echo "</ul>"; ?>
<?php
endif;
if(count($this->data['Group'])):
?>
    <span class="viewtitle"><?php __('Group Implementor');?>:</span> <?php echo "<ul>"; foreach($this->data['Group'] as $group) echo "<li>".$group['name']."</li>"; echo "</ul>"; ?>
<?php
endif;
?>
<fieldset>
        <legend>
		<?php if($this->data['Decision']['grouped']==0){ __('Group the status');}else{__('Ungroup the status');}?>
		</legend>
			<?php 
			 if($this->data['Decision']['grouped']==0){ 
				 echo $form->hidden('grouped', $options = array ('value'=>1));
				 echo $form->input('status');
			}else{
				echo $form->hidden('grouped', $options = array ('value'=>0));?>
				<span class="viewtitle"><?php __('Status');?>:</span> 
				<?php echo $this->data['Decision']['status'];?> <br/>
				<?php echo $form->hidden('status',$options = array ('value'=>'')); 
				}
			?>
    </fieldset>
	<br/><br/><b>
			<?php 
			 if($this->data['Decision']['grouped']==0){echo __('Are you sure you want to group this status?', true);
			}else{
			echo __('Are you sure you want to ungroup this status?', true);}
			?>
			</b><br/>
<?php echo $form->button(__('Save', true),array('type'=>'submit'));?>&nbsp;
<?php echo $form->button(__('Cancel', true), array('type'=>'button', 'onclick'=>'history.go(-1)'));?>
<?php echo $form->end();?>
</div>
